<template>
    <div class="body" id="app-home">
        <div id="topNav"></div>
        <appNav v-show="AppNavShow" @close="closeAppNav"></appNav>
        <nuxt />
        <Tabbar v-if="TabbarShow"></Tabbar>
    </div>
</template>

<script>
import mixinsUser from "~/mixins/user";
import mixinsIndex from "~/mixins/index";
import appNav from "@/components/index/appNav";
import Tabbar from "@/components/index/Tabbar";
import { mapMutations, mapState } from "vuex";
export default {
    components: {
        appNav,
        Tabbar,
    },
    mixins: [mixinsUser, mixinsIndex],
    data() {
        return {};
    },
    mounted() {},
    computed: {
        TabbarShow: function () {
            let array = ["/", "/quizdata", "/cswd", "/user"];
            return array.includes(this.$route.path);
        },
        ...mapState("common", {
            AppNavShow: (state) => state.AppNavShow,
        }),
    },
    methods: {
        ...mapMutations("common", ["set_AppNavShow"]),
        closeAppNav() {
            this.set_AppNavShow(false);
            console.log(this.AppNavShow)
        },
    },
};
</script>

<style lang="scss" scoped>
</style>
<style lang="scss">
* {
    margin: 0;
    padding: 0;
    font-family: "Microsoft YaHei", "SimHei", sans-serif;
}
audio,
button,
camera,
canvas,
checkbox,
div,
form,
icon,
image,
input,
label,
live-player,
live-pusher,
map,
navigator,
picker,
picker-view,
progress,
radio,
scroll-view,
slider,
swiper,
switch,
text,
video,
view,
web-view {
    box-sizing: border-box;
}
html {
    font-size: 16px;
}

a {
    text-decoration: none;
    color: #333333;
}

em {
    color: #fa3534;
    font-style: normal;
}
</style>
